﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Driverplugin;

namespace IoTEdge.Grpc.Server.Libs.entities
{
    /// <summary>
    /// 上报数据实体
    /// </summary>
    public class UpdateDataToIoTEdge
    {
        /// <summary>
        /// 设备模型ID
        /// </summary>
        public string p_id { get; set; }
        /// <summary>
        /// 设备的ID
        /// </summary>
        public string d_id { get; set; }
        /// <summary>
        /// 模块集合
        /// </summary>
        public Dictionary<string, CustomModule> services { get; set; } = new();
        public string ts { get; set; }
    }
    /// <summary>
    /// 自定义模块
    /// </summary>
    public class CustomModule
    {
        /// <summary>
        /// 每个模块有若干属性
        /// </summary>
        public Dictionary<string, CustomProperty> properties { get; set; } = new();
    }
    /// <summary>
    /// 每个属性内容
    /// </summary>
    public class CustomProperty
    {
        public object value { get; set; }
        public string dataType { get; set; }
    }
}
